import axios from '@/utils/myaxios'

// 文章列表
export const getPostList = (params) => {
  return axios({
    url: '/post',
    params
  })
}


// 文章详情
export const particulars = (id) => {
  return axios({
    url: `/post/${id}`
  })
}



// 收藏文章
export const post_star = (id) => {
  return axios({
    url: `/post_star/${id}`
  })
}


// 获取用户的所有评论
export const commentList = (id, params) => {
  return axios({
    url: `/post_comment/${id}`,
    params
  })
}


// 发布评论
export const releaseConnment = (id, data) => {
  return axios({
    method: 'post',
    url: `/post_comment/${id}`,
    data
  })
}